package com.example.echoewish.repository.network.service;

import com.example.echoewish.pojo.Friend;
import com.example.echoewish.pojo.User;

import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface UserService {
    @GET("user/register")
    Call<ResponseBody> registerNewUsers(@Query("account")String account, @Query("password") String password);

    @GET("user/login")
    Call<ResponseBody> loginOn(@Query("account")String account,@Query("password") String password);

    @GET("user/queryUserByUserId")
    Call<User> queryUserByUserId(@Query("userId")int userId);

    @POST("user/updateUserHeadImage")
    Call<ResponseBody> updateUserHeadImage(@Body RequestBody fileAndData);

    @GET("user/updateUserInfo")
    Call<ResponseBody> updateUserInfo(@Query("userId")int userId,@Query("name")String name,@Query("sex")int sex,@Query("grade")int grade,@Query("campus") String campus);

    @GET("user/getFriendMessage")
    Call<Friend> getFriendMessage(@Query("userId")int userId,@Query("friId") int friId);
}
